{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}
{if $agora_config.o_rss_enabled}
{feed task=rss tid=$topic.id key=$agora_user.rss_id}
{/if}

<div class="ag_postlinksTop">
	<div class="ag_inbox">
		<div class="ag_bcrumbs">
			{include file=agora:include/bcrumbs.tpl}
		</div>
		<div class="ag_pagelink">
			{include file=agora:include/paginate.tpl}

			<div class="ag_forumTools">
				{include file=agora:tools/topic.tpl}
			</div>
		</div>
	</div>
</div>

<div class="ag_rightend">
	<h2 class="ag_headerbar"><span class="ag_middle">{$topic.subject}</span></h2>
</div>

{if $poll}
<div class="ag_blockform">
	<div class="ag_rightend">
		<div class="ag_headerbar"><span class="ag_middle">##Poll##</span></div>
	</div>
	{if $poll.voted || !$access.post_reply}
		{include file=agora:poll/result_`$poll.type`.tpl}
	{else}
		{include file=agora:poll/vote_`$poll.type`.tpl}
	{/if}
</div>
<div class="ag_clearer"></div>
{/if}

{foreach name=post_loop from=$posts item=post}
	{include file=agora:include/post_row.tpl post_num=$post.post_number post_num_on_page=$smarty.foreach.post_loop.iteration}
{/foreach}

<div class="ag_postlinksBottom">
	<div class="ag_inbox">
		<div class="ag_pagelink">
			{include file=agora:include/paginate.tpl}
		</div>
		<div class="ag_bcrumbs">
			{include file=agora:include/bcrumbs.tpl}
		</div>
	</div>
</div>

{if $agora_config.o_social_bookmarks}
<div id="ag_socialbookmarks">
	{include file=agora:misc/bookmarks.tpl}
</div>
{/if}

{if $agora_config.o_quickpost and $access.post_reply and not $topic.closed}
	{include file=agora:post/quick_reply.tpl topic_id=$topic.id}
{/if}